package com.easylinkin.sm.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import lombok.Data;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import site.morn.boot.data.entity.ReviserEntity;

/**
 * 国际化表
 *
 * @author zhanchuanfang
 * @DATE 2018/11/7 11:30
 * @since 0.1.0-SNAPSHOT,  2018/11/7
 */

@Data
@Entity
@Table(name = "sm_i18n")
@TableName("sm_i18n")
@FieldNameConstants
@DynamicInsert
@DynamicUpdate
public class I18n extends ReviserEntity implements Serializable {

  /**
   * 序列化
   */
  private static final long serialVersionUID = 1L;

  /**
   * 主键
   */
  @Min(Long.MIN_VALUE)
  @Max(Long.MAX_VALUE)
  @Id
  @Column(name = "id_")
  @GeneratedValue
  private Long id;

  /**
   * 语种
   */
  @Size(max = 32)
  @Column(name = "language_")
  private String language;

  /**
   * 国际化key
   */
  @Min(Long.MIN_VALUE)
  @Max(Long.MAX_VALUE)
  @Column(name = "key_", length = 32)
  private Long key;

  /**
   * 国际化value
   */
  @Size(max = 64)
  @Column(name = "value_", length = 32)
  private String value;

  /**
   * 所属模块
   */
  @Column(name = "module_")
  private String module;

}
